<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MRSL JPS3D Library: include/jps_collision/map_util.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MRSL JPS3D Library
   &#160;<span id="projectnumber">1.1</span>
   </div>
   <div id="projectbrief">An implementaion of Jump Point Search on 3D voxel map</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_16f9237c2eb6ee71ebe7bb5d56514662.html">jps_collision</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">map_util.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="map__util_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef JPS_MAP_UTIL_H</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define JPS_MAP_UTIL_H</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="data__type_8h.html">jps_basis/data_type.h</a>&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceJPS.html">JPS</a> {</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">   13</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">Tmap</a> = std::vector&lt;signed char&gt;;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html">   18</a></span>&#160;  <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt; <span class="keyword">class </span><a class="code" href="classJPS_1_1MapUtil.html">MapUtil</a> {</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#aa8fd6e0ec48b26aa2389d1fb0abc98ab">   21</a></span>&#160;      <a class="code" href="classJPS_1_1MapUtil.html#aa8fd6e0ec48b26aa2389d1fb0abc98ab">MapUtil</a>() {}</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a063970737c83a879af2a5a3048fbbcb0">   23</a></span>&#160;      <a class="code" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">Tmap</a> <a class="code" href="classJPS_1_1MapUtil.html#a063970737c83a879af2a5a3048fbbcb0">getMap</a>() { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>; }</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a3a631a3e8602ae94b5e80aa498b98432">   25</a></span>&#160;      <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> <a class="code" href="classJPS_1_1MapUtil.html#a3a631a3e8602ae94b5e80aa498b98432">getRes</a>() { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a>; }</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a8f76efd339f007430e9be8369c7cbe8b">   27</a></span>&#160;      <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#a8f76efd339f007430e9be8369c7cbe8b">getDim</a>() { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>; }</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#acd6b8009a980068b78fbfd61947cc454">   29</a></span>&#160;      <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#acd6b8009a980068b78fbfd61947cc454">getOrigin</a>() { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a>; }</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">   31</a></span>&#160;      <span class="keywordtype">int</span> <a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a>&amp; pn) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;          <span class="keywordflow">return</span> Dim == 2 ? pn(0) + <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0) * pn(1) :</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                            pn(0) + <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0) * pn(1) + <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0) * <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1) * pn(2);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;      }</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a91b5bba88e83d37f597a9d3f905bb6cc">   37</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a91b5bba88e83d37f597a9d3f905bb6cc">isOutsideXYZ</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;n, <span class="keywordtype">int</span> i) { <span class="keywordflow">return</span> n(i) &lt; 0 || n(i) &gt;= <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(i); }</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">   39</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">isFree</a>(<span class="keywordtype">int</span> idx) { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[idx] == <a class="code" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">val_free</a>; }</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">   41</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">isUnknown</a>(<span class="keywordtype">int</span> idx) { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[idx] == <a class="code" href="classJPS_1_1MapUtil.html#adc66622bc8b73a297199bfa1fcf288cd">val_unknown</a>; }</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">   43</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<span class="keywordtype">int</span> idx) { <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[idx] &gt; <a class="code" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">val_free</a>; }</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">   46</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;pn) {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; Dim; i++)</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;          <span class="keywordflow">if</span> (pn(i) &lt; 0 || pn(i) &gt;= <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(i))</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      }</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a7f11bf3aade5f92e25c50eba562df534">   53</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a7f11bf3aade5f92e25c50eba562df534">isFree</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;pn) {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(pn))</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;          <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;          <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">isFree</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(pn));</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;      }</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a6bfb96298e94e17750691556cb092726">   60</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a6bfb96298e94e17750691556cb092726">isOccupied</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;pn) {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(pn))</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;          <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;          <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(pn));</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;      }</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#aec0709f3e97aa23c6cbd9fb13c6beb0d">   67</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#aec0709f3e97aa23c6cbd9fb13c6beb0d">isUnknown</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;pn) {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(pn))</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;          <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(pn)] == <a class="code" href="classJPS_1_1MapUtil.html#adc66622bc8b73a297199bfa1fcf288cd">val_unknown</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;      }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a46c58b74f9236571bf0f0c13c36e1799">   81</a></span>&#160;      <span class="keywordtype">void</span> <a class="code" href="classJPS_1_1MapUtil.html#a46c58b74f9236571bf0f0c13c36e1799">setMap</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a>&amp; ori, <span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a>&amp; dim, <span class="keyword">const</span> <a class="code" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">Tmap</a> &amp;map, <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> res) {</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a> = map;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a> = dim;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a> = ori;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a> = res;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;      }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#ab37f13016c575616c2861c363d6fc100">   89</a></span>&#160;      <span class="keywordtype">void</span> <a class="code" href="classJPS_1_1MapUtil.html#ab37f13016c575616c2861c363d6fc100">info</a>() {</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> range = <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>.template cast&lt;decimal_t&gt;() * <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;MapUtil Info ========================== &quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;   res: [&quot;</span> &lt;&lt; <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a> &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;   origin: [&quot;</span> &lt;&lt; <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a>.transpose() &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;   range: [&quot;</span> &lt;&lt; range.transpose() &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        std::cout &lt;&lt; <span class="stringliteral">&quot;   dim: [&quot;</span> &lt;&lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>.transpose() &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      };</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#ace5ba6ed83f0adaad09284913bef1d97">   99</a></span>&#160;      <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#ace5ba6ed83f0adaad09284913bef1d97">floatToInt</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> &amp;pt) {</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> pn;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; Dim; i++)</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;          pn(i) = std::round((pt(i) - <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a>(i)) / <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a> - 0.5);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordflow">return</span> pn;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      }</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">  106</a></span>&#160;      <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> &amp;pn) {</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="comment">//return pn.template cast&lt;decimal_t&gt;() * res_ + origin_d_;</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keywordflow">return</span> (pn.template cast&lt;decimal_t&gt;() + <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;::Constant</a>(0.5)) * <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a> + <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a>;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      }</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#aa8548996d3399404b33570188c8b5f10">  112</a></span>&#160;      <a class="code" href="data__type_8h.html#afb24b810e24942cb8cafdd097b8272fb">vec_Veci&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#aa8548996d3399404b33570188c8b5f10">rayTrace</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> &amp;pt1, <span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> &amp;pt2) {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> diff = pt2 - pt1;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> k = 0.8;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordtype">int</span> max_diff = (diff / <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a>).<span class="keyword">template</span> lpNorm&lt;Eigen::Infinity&gt;() / k;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> s = 1.0 / max_diff;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> step = diff * s;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="data__type_8h.html#afb24b810e24942cb8cafdd097b8272fb">vec_Veci&lt;Dim&gt;</a> pns;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> prev_pn = <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;::Constant</a>(-1);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> n = 1; n &lt; max_diff; n++) {</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;          <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> pt = pt1 + step * n;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;          <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> new_pn = <a class="code" href="classJPS_1_1MapUtil.html#ace5ba6ed83f0adaad09284913bef1d97">floatToInt</a>(pt);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;          <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(new_pn))</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="keywordflow">break</span>;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;          <span class="keywordflow">if</span> (new_pn != prev_pn)</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            pns.push_back(new_pn);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;          prev_pn = new_pn;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        }</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">return</span> pns;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;      }</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a966c0cc062c81a1cdb223ba4a825d4d6">  134</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classJPS_1_1MapUtil.html#a966c0cc062c81a1cdb223ba4a825d4d6">isBlocked</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a>&amp; p1, <span class="keyword">const</span> <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a>&amp; p2, int8_t val = 100) {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <a class="code" href="data__type_8h.html#afb24b810e24942cb8cafdd097b8272fb">vec_Veci&lt;Dim&gt;</a> pns = <a class="code" href="classJPS_1_1MapUtil.html#aa8548996d3399404b33570188c8b5f10">rayTrace</a>(p1, p2);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;pn : pns) {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;          <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(pn)] &gt;= val)</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        }</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      }</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#aa53c0c359bc1f8f7bcb0b647365af0e0">  144</a></span>&#160;      <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#aa53c0c359bc1f8f7bcb0b647365af0e0">getCloud</a>() {</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> cloud;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> n;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">if</span>(Dim == 3) {</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;              <span class="keywordflow">for</span> (n(2) = 0; n(2) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(2); n(2)++) {</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;                  cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;              }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            }</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;          }</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        }</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Dim == 2) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;              <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;                cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            }</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;          }</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        }</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">return</span> cloud;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      }</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a3cc3638cc80cfdff8a38b857c5c7d021">  170</a></span>&#160;      <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#a3cc3638cc80cfdff8a38b857c5c7d021">getFreeCloud</a>() {</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> cloud;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> n;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="keywordflow">if</span>(Dim == 3) {</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;              <span class="keywordflow">for</span> (n(2) = 0; n(2) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(2); n(2)++) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">isFree</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                  cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;              }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            }</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;          }</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        }</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Dim == 2) {</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;              <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">isFree</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            }</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;          }</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        }</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="keywordflow">return</span> cloud;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;      }</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#ada6443edeaf252cf6f52ae3da5cbfa29">  196</a></span>&#160;      <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#ada6443edeaf252cf6f52ae3da5cbfa29">getUnknownCloud</a>() {</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf&lt;Dim&gt;</a> cloud;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> n;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keywordflow">if</span>(Dim == 3) {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;              <span class="keywordflow">for</span> (n(2) = 0; n(2) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(2); n(2)++) {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">isUnknown</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                  cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;              }</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            }</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;          }</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        }</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Dim == 2) {</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;              <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">isUnknown</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                cloud.push_back(<a class="code" href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">intToFloat</a>(n));</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            }</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;          }</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="keywordflow">return</span> cloud;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;      }</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a5234a558d977c4f873c16a6399c7bd49">  222</a></span>&#160;      <span class="keywordtype">void</span> <a class="code" href="classJPS_1_1MapUtil.html#a5234a558d977c4f873c16a6399c7bd49">dilate</a>(<span class="keyword">const</span> <a class="code" href="data__type_8h.html#afb24b810e24942cb8cafdd097b8272fb">vec_Veci&lt;Dim&gt;</a>&amp; dilate_neighbor) {</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <a class="code" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">Tmap</a> map = <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> n = <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;::Zero</a>();</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <span class="keywordflow">if</span>(Dim == 3) {</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;              <span class="keywordflow">for</span> (n(2) = 0; n(2) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(2); n(2)++) {</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n))) {</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;it : dilate_neighbor) {</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                    <span class="keywordflow">if</span> (!<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(n + it))</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                      map[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n + it)] = <a class="code" href="classJPS_1_1MapUtil.html#a66b70270a1e2a713809a6e62f88c3668">val_occ</a>;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                  }</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                }</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;              }</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;          }</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        }</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(Dim == 2) {</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;              <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">isOccupied</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n))) {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &amp;it : dilate_neighbor) {</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                  <span class="keywordflow">if</span> (!<a class="code" href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">isOutside</a>(n + it))</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                    map[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n + it)] = <a class="code" href="classJPS_1_1MapUtil.html#a66b70270a1e2a713809a6e62f88c3668">val_occ</a>;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                }</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;              }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            }</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;          }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        }</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a> = map;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;      }</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a2bf009d9dde735bb25ce67d4a8ba18c4">  256</a></span>&#160;      <span class="keywordtype">void</span> <a class="code" href="classJPS_1_1MapUtil.html#a2bf009d9dde735bb25ce67d4a8ba18c4">freeUnknown</a>() {</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> n;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordflow">if</span>(Dim == 3) {</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;              <span class="keywordflow">for</span> (n(2) = 0; n(2) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(2); n(2)++) {</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">isUnknown</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                  <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)] = <a class="code" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">val_free</a>;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;              }</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            }</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;          }</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Dim == 2) {</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;          <span class="keywordflow">for</span> (n(0) = 0; n(0) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(0); n(0)++) {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="keywordflow">for</span> (n(1) = 0; n(1) &lt; <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>(1); n(1)++) {</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;              <span class="keywordflow">if</span> (<a class="code" href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">isUnknown</a>(<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)))</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;                <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>[<a class="code" href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">getIndex</a>(n)] = <a class="code" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">val_free</a>;</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            }</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;          }</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        }</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;      }</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">  279</a></span>&#160;      <a class="code" href="map__util_8h.html#ae95b386410227fb07270118da3a80230">Tmap</a> <a class="code" href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">map_</a>;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">  282</a></span>&#160;      <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> <a class="code" href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">res_</a>;</div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">  284</a></span>&#160;      <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">origin_d_</a>;</div><div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">  286</a></span>&#160;      <a class="code" href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci&lt;Dim&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">dim_</a>;</div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a66b70270a1e2a713809a6e62f88c3668">  288</a></span>&#160;      int8_t <a class="code" href="classJPS_1_1MapUtil.html#a66b70270a1e2a713809a6e62f88c3668">val_occ</a> = 100;</div><div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">  290</a></span>&#160;      int8_t <a class="code" href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">val_free</a> = 0;</div><div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="classJPS_1_1MapUtil.html#adc66622bc8b73a297199bfa1fcf288cd">  292</a></span>&#160;      int8_t <a class="code" href="classJPS_1_1MapUtil.html#adc66622bc8b73a297199bfa1fcf288cd">val_unknown</a> = -1;</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  };</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classJPS_1_1MapUtil.html">MapUtil&lt;2&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html">OccMapUtil</a>;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  <span class="keyword">typedef</span> <a class="code" href="classJPS_1_1MapUtil.html">MapUtil&lt;3&gt;</a> <a class="code" href="classJPS_1_1MapUtil.html">VoxelMapUtil</a>;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;}</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classJPS_1_1MapUtil_html_a3cc3638cc80cfdff8a38b857c5c7d021"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a3cc3638cc80cfdff8a38b857c5c7d021">JPS::MapUtil::getFreeCloud</a></div><div class="ttdeci">vec_Vecf&lt; Dim &gt; getFreeCloud()</div><div class="ttdoc">Get free voxels. </div><div class="ttdef"><b>Definition:</b> map_util.h:170</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a5234a558d977c4f873c16a6399c7bd49"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a5234a558d977c4f873c16a6399c7bd49">JPS::MapUtil::dilate</a></div><div class="ttdeci">void dilate(const vec_Veci&lt; Dim &gt; &amp;dilate_neighbor)</div><div class="ttdoc">Dilate occupied cells. </div><div class="ttdef"><b>Definition:</b> map_util.h:222</div></div>
<div class="ttc" id="namespaceJPS_html"><div class="ttname"><a href="namespaceJPS.html">JPS</a></div><div class="ttdef"><b>Definition:</b> map_util.h:11</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_aa8fd6e0ec48b26aa2389d1fb0abc98ab"><div class="ttname"><a href="classJPS_1_1MapUtil.html#aa8fd6e0ec48b26aa2389d1fb0abc98ab">JPS::MapUtil::MapUtil</a></div><div class="ttdeci">MapUtil()</div><div class="ttdoc">Simple constructor. </div><div class="ttdef"><b>Definition:</b> map_util.h:21</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a6bfb96298e94e17750691556cb092726"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a6bfb96298e94e17750691556cb092726">JPS::MapUtil::isOccupied</a></div><div class="ttdeci">bool isOccupied(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Check if the given cell is occupied by coordinate. </div><div class="ttdef"><b>Definition:</b> map_util.h:60</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_adc66622bc8b73a297199bfa1fcf288cd"><div class="ttname"><a href="classJPS_1_1MapUtil.html#adc66622bc8b73a297199bfa1fcf288cd">JPS::MapUtil::val_unknown</a></div><div class="ttdeci">int8_t val_unknown</div><div class="ttdoc">Assume unknown cell has value -1. </div><div class="ttdef"><b>Definition:</b> map_util.h:292</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a8c33e3cbd3ffa17a193edab6a6c1c93a"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a8c33e3cbd3ffa17a193edab6a6c1c93a">JPS::MapUtil::origin_d_</a></div><div class="ttdeci">Vecf&lt; Dim &gt; origin_d_</div><div class="ttdoc">Origin, float type. </div><div class="ttdef"><b>Definition:</b> map_util.h:284</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html"><div class="ttname"><a href="classJPS_1_1MapUtil.html">JPS::MapUtil</a></div><div class="ttdef"><b>Definition:</b> map_util.h:18</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a20a80b81495d9b7694d297ea01d8b409"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a20a80b81495d9b7694d297ea01d8b409">JPS::MapUtil::isOutside</a></div><div class="ttdeci">bool isOutside(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Check if the cell is outside by coordinate. </div><div class="ttdef"><b>Definition:</b> map_util.h:46</div></div>
<div class="ttc" id="map__util_8h_html_ae95b386410227fb07270118da3a80230"><div class="ttname"><a href="map__util_8h.html#ae95b386410227fb07270118da3a80230">JPS::Tmap</a></div><div class="ttdeci">std::vector&lt; signed char &gt; Tmap</div><div class="ttdoc">The type of map data Tmap is defined as a 1D array. </div><div class="ttdef"><b>Definition:</b> map_util.h:13</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_ab37f13016c575616c2861c363d6fc100"><div class="ttname"><a href="classJPS_1_1MapUtil.html#ab37f13016c575616c2861c363d6fc100">JPS::MapUtil::info</a></div><div class="ttdeci">void info()</div><div class="ttdoc">Print basic information about the util. </div><div class="ttdef"><b>Definition:</b> map_util.h:89</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a3a631a3e8602ae94b5e80aa498b98432"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a3a631a3e8602ae94b5e80aa498b98432">JPS::MapUtil::getRes</a></div><div class="ttdeci">decimal_t getRes()</div><div class="ttdoc">Get resolution. </div><div class="ttdef"><b>Definition:</b> map_util.h:25</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_ace5ba6ed83f0adaad09284913bef1d97"><div class="ttname"><a href="classJPS_1_1MapUtil.html#ace5ba6ed83f0adaad09284913bef1d97">JPS::MapUtil::floatToInt</a></div><div class="ttdeci">Veci&lt; Dim &gt; floatToInt(const Vecf&lt; Dim &gt; &amp;pt)</div><div class="ttdoc">Float position to discrete cell coordinate. </div><div class="ttdef"><b>Definition:</b> map_util.h:99</div></div>
<div class="ttc" id="data__type_8h_html_a0a3b37beb40c06edc02cb4b7339f2b96"><div class="ttname"><a href="data__type_8h.html#a0a3b37beb40c06edc02cb4b7339f2b96">vec_Vecf</a></div><div class="ttdeci">vec_E&lt; Vecf&lt; N &gt; &gt; vec_Vecf</div><div class="ttdoc">Vector of Eigen 1D float vector. </div><div class="ttdef"><b>Definition:</b> data_type.h:69</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a1ab3654115ae825874d3d551683886a9"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a1ab3654115ae825874d3d551683886a9">JPS::MapUtil::intToFloat</a></div><div class="ttdeci">Vecf&lt; Dim &gt; intToFloat(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Discrete cell coordinate to float position. </div><div class="ttdef"><b>Definition:</b> map_util.h:106</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a65e17f5903f5adceaeacfbe964df1fc5"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a65e17f5903f5adceaeacfbe964df1fc5">JPS::MapUtil::val_free</a></div><div class="ttdeci">int8_t val_free</div><div class="ttdoc">Assume free cell has value 0. </div><div class="ttdef"><b>Definition:</b> map_util.h:290</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_acd6b8009a980068b78fbfd61947cc454"><div class="ttname"><a href="classJPS_1_1MapUtil.html#acd6b8009a980068b78fbfd61947cc454">JPS::MapUtil::getOrigin</a></div><div class="ttdeci">Vecf&lt; Dim &gt; getOrigin()</div><div class="ttdoc">Get origin. </div><div class="ttdef"><b>Definition:</b> map_util.h:29</div></div>
<div class="ttc" id="data__type_8h_html_ac208833a6aa7ec29f39eb5ae142aaede"><div class="ttname"><a href="data__type_8h.html#ac208833a6aa7ec29f39eb5ae142aaede">Veci</a></div><div class="ttdeci">Eigen::Matrix&lt; int, N, 1 &gt; Veci</div><div class="ttdoc">Eigen 1D int vector of size N. </div><div class="ttdef"><b>Definition:</b> data_type.h:58</div></div>
<div class="ttc" id="data__type_8h_html_a7c99d9360fc6cac2762b786e2fb52266"><div class="ttname"><a href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a></div><div class="ttdeci">double decimal_t</div><div class="ttdoc">Rename the float type used in lib. </div><div class="ttdef"><b>Definition:</b> data_type.h:48</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a5ac31d74de462b53f15a4e4b72516b68"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a5ac31d74de462b53f15a4e4b72516b68">JPS::MapUtil::getIndex</a></div><div class="ttdeci">int getIndex(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Get index of a cell. </div><div class="ttdef"><b>Definition:</b> map_util.h:31</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a7d9204506b953011d256d1baee5fa4c5"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a7d9204506b953011d256d1baee5fa4c5">JPS::MapUtil::isUnknown</a></div><div class="ttdeci">bool isUnknown(int idx)</div><div class="ttdoc">Check if the cell is unknown by index. </div><div class="ttdef"><b>Definition:</b> map_util.h:41</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a7f11bf3aade5f92e25c50eba562df534"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a7f11bf3aade5f92e25c50eba562df534">JPS::MapUtil::isFree</a></div><div class="ttdeci">bool isFree(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Check if the given cell is free by coordinate. </div><div class="ttdef"><b>Definition:</b> map_util.h:53</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_aa53c0c359bc1f8f7bcb0b647365af0e0"><div class="ttname"><a href="classJPS_1_1MapUtil.html#aa53c0c359bc1f8f7bcb0b647365af0e0">JPS::MapUtil::getCloud</a></div><div class="ttdeci">vec_Vecf&lt; Dim &gt; getCloud()</div><div class="ttdoc">Get occupied voxels. </div><div class="ttdef"><b>Definition:</b> map_util.h:144</div></div>
<div class="ttc" id="data__type_8h_html_afb24b810e24942cb8cafdd097b8272fb"><div class="ttname"><a href="data__type_8h.html#afb24b810e24942cb8cafdd097b8272fb">vec_Veci</a></div><div class="ttdeci">vec_E&lt; Veci&lt; N &gt; &gt; vec_Veci</div><div class="ttdoc">Vector of Eigen 1D int vector. </div><div class="ttdef"><b>Definition:</b> data_type.h:72</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_ae189397c064965d44b2f94b91011ea52"><div class="ttname"><a href="classJPS_1_1MapUtil.html#ae189397c064965d44b2f94b91011ea52">JPS::MapUtil::isOccupied</a></div><div class="ttdeci">bool isOccupied(int idx)</div><div class="ttdoc">Check if the cell is occupied by index. </div><div class="ttdef"><b>Definition:</b> map_util.h:43</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a9972aed929695ceee20a8db01f23cabd"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a9972aed929695ceee20a8db01f23cabd">JPS::MapUtil::res_</a></div><div class="ttdeci">decimal_t res_</div><div class="ttdoc">Resolution. </div><div class="ttdef"><b>Definition:</b> map_util.h:282</div></div>
<div class="ttc" id="data__type_8h_html"><div class="ttname"><a href="data__type_8h.html">data_type.h</a></div><div class="ttdoc">Defines all data types used in this lib. </div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a566997fa2a6a96693bbe95a9a31a4f77"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a566997fa2a6a96693bbe95a9a31a4f77">JPS::MapUtil::map_</a></div><div class="ttdeci">Tmap map_</div><div class="ttdoc">Map entity. </div><div class="ttdef"><b>Definition:</b> map_util.h:279</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a063970737c83a879af2a5a3048fbbcb0"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a063970737c83a879af2a5a3048fbbcb0">JPS::MapUtil::getMap</a></div><div class="ttdeci">Tmap getMap()</div><div class="ttdoc">Get map data. </div><div class="ttdef"><b>Definition:</b> map_util.h:23</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a2bf009d9dde735bb25ce67d4a8ba18c4"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a2bf009d9dde735bb25ce67d4a8ba18c4">JPS::MapUtil::freeUnknown</a></div><div class="ttdeci">void freeUnknown()</div><div class="ttdoc">Free unknown voxels. </div><div class="ttdef"><b>Definition:</b> map_util.h:256</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a966c0cc062c81a1cdb223ba4a825d4d6"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a966c0cc062c81a1cdb223ba4a825d4d6">JPS::MapUtil::isBlocked</a></div><div class="ttdeci">bool isBlocked(const Vecf&lt; Dim &gt; &amp;p1, const Vecf&lt; Dim &gt; &amp;p2, int8_t val=100)</div><div class="ttdoc">Check if the ray from p1 to p2 is occluded. </div><div class="ttdef"><b>Definition:</b> map_util.h:134</div></div>
<div class="ttc" id="data__type_8h_html_a3a0c45655a5e009e56634ccde0c5c575"><div class="ttname"><a href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf</a></div><div class="ttdeci">Eigen::Matrix&lt; decimal_t, N, 1 &gt; Vecf</div><div class="ttdoc">Eigen 1D float vector of size N. </div><div class="ttdef"><b>Definition:</b> data_type.h:55</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a17867570bcea899f59307997821cc202"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a17867570bcea899f59307997821cc202">JPS::MapUtil::dim_</a></div><div class="ttdeci">Veci&lt; Dim &gt; dim_</div><div class="ttdoc">Dimension, int type. </div><div class="ttdef"><b>Definition:</b> map_util.h:286</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_aa8548996d3399404b33570188c8b5f10"><div class="ttname"><a href="classJPS_1_1MapUtil.html#aa8548996d3399404b33570188c8b5f10">JPS::MapUtil::rayTrace</a></div><div class="ttdeci">vec_Veci&lt; Dim &gt; rayTrace(const Vecf&lt; Dim &gt; &amp;pt1, const Vecf&lt; Dim &gt; &amp;pt2)</div><div class="ttdoc">Raytrace from float point pt1 to pt2. </div><div class="ttdef"><b>Definition:</b> map_util.h:112</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a66b70270a1e2a713809a6e62f88c3668"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a66b70270a1e2a713809a6e62f88c3668">JPS::MapUtil::val_occ</a></div><div class="ttdeci">int8_t val_occ</div><div class="ttdoc">Assume occupied cell has value 100. </div><div class="ttdef"><b>Definition:</b> map_util.h:288</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a91b5bba88e83d37f597a9d3f905bb6cc"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a91b5bba88e83d37f597a9d3f905bb6cc">JPS::MapUtil::isOutsideXYZ</a></div><div class="ttdeci">bool isOutsideXYZ(const Veci&lt; Dim &gt; &amp;n, int i)</div><div class="ttdoc">Check if the given cell is outside of the map in i-the dimension. </div><div class="ttdef"><b>Definition:</b> map_util.h:37</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_ada6443edeaf252cf6f52ae3da5cbfa29"><div class="ttname"><a href="classJPS_1_1MapUtil.html#ada6443edeaf252cf6f52ae3da5cbfa29">JPS::MapUtil::getUnknownCloud</a></div><div class="ttdeci">vec_Vecf&lt; Dim &gt; getUnknownCloud()</div><div class="ttdoc">Get unknown voxels. </div><div class="ttdef"><b>Definition:</b> map_util.h:196</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a9f3ae5f032931a5671b9f406086af719"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a9f3ae5f032931a5671b9f406086af719">JPS::MapUtil::isFree</a></div><div class="ttdeci">bool isFree(int idx)</div><div class="ttdoc">Check if the cell is free by index. </div><div class="ttdef"><b>Definition:</b> map_util.h:39</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a8f76efd339f007430e9be8369c7cbe8b"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a8f76efd339f007430e9be8369c7cbe8b">JPS::MapUtil::getDim</a></div><div class="ttdeci">Veci&lt; Dim &gt; getDim()</div><div class="ttdoc">Get dimensions. </div><div class="ttdef"><b>Definition:</b> map_util.h:27</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_a46c58b74f9236571bf0f0c13c36e1799"><div class="ttname"><a href="classJPS_1_1MapUtil.html#a46c58b74f9236571bf0f0c13c36e1799">JPS::MapUtil::setMap</a></div><div class="ttdeci">void setMap(const Vecf&lt; Dim &gt; &amp;ori, const Veci&lt; Dim &gt; &amp;dim, const Tmap &amp;map, decimal_t res)</div><div class="ttdoc">Set map. </div><div class="ttdef"><b>Definition:</b> map_util.h:81</div></div>
<div class="ttc" id="classJPS_1_1MapUtil_html_aec0709f3e97aa23c6cbd9fb13c6beb0d"><div class="ttname"><a href="classJPS_1_1MapUtil.html#aec0709f3e97aa23c6cbd9fb13c6beb0d">JPS::MapUtil::isUnknown</a></div><div class="ttdeci">bool isUnknown(const Veci&lt; Dim &gt; &amp;pn)</div><div class="ttdoc">Check if the given cell is unknown by coordinate. </div><div class="ttdef"><b>Definition:</b> map_util.h:67</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
